This document mainly introduces what functions can be used for the geological model after it is imported into SuperMap, what effect can be achieved, and what kind of application can it have in the project?
In SuperMap iDesktop, we can modify model colors in batches, edit and modify model textures. In SuperMap iClient3D for WebGL, we have also implemented a variety of geological body real-time analysis functions, including:
This article introduces step by step from the following three aspects:
If the imported geological body model has no material, or if you want to modify the material of the model, you can do it in SuperMap iDesktop.
Currently we provide three ways to edit materials:
Let's take a Geo3DML file as an example to illustrate:
Among them, Zone has 4 objects; Layer has 5 objects, and Fault has 11 objects, a total of 20 objects. The model itself has no material information, and the color of the model seen at this time is randomly generated, not the actual color effect.
However, the imported model has no material information, and it is displayed as the default gray material.
1. Click the "3D geographic design-model operation-material editing-material" button to pop up the material browser panel.
2. Click the "Add" button, and create a new material "stratum x", and set the material color and texture.
The RGB value of the material color can refer to the color scale shown in the figure below.
3. After setting the color and texture, select the object in the scene, and then click the "Assign Material to Selected Object" button to directly assign the set material to the corresponding object.
4. Select other objects in the scene one by one, and give them materials.
As shown in the picture below, another imported model has no color and texture.
The function of "modifying model material color in batches" supports filtering out objects of the same material according to the attribute information of model objects, and then assigning materials in batches.
If the imported data set itself already has the properties of recording materials, you can skip the first two steps and go to the third step. If there is no relevant material property, you need to add a material property first.
Select the data set, right-click the "Properties" button, and the property panel will pop up; in the property panel, click the "Add" button to add a new property. Add a text-type attribute here and name it "Color".
Select the data set, right-click "Browse Attribute Table", you can see that at the end of the attribute table, the "Color" attribute added in the previous step is displayed. According to the requirements of the project, assign it a value.
Click the "3D data-model processing-modify material color" function, in the pop-up "Modify model material in batches" panel, select "condition setting", and set the color of the model in batches by setting SQL expressions.
In the SQL expression panel, select the Color object and click Get Unique Value to get all the Color attributes, and then use the Color='color' expression to filter out objects of the same material.
Set the filter conditions and filter colors of different colors in turn, and finally click OK to generate a new data set with material colors.
The function in 1.2 can only modify the color of the model, but cannot edit the texture of the model. If you want to add or modify the texture of the model, you need to use the "Material Editor" function.
The "Material Browser" function can select objects in real time to modify materials, and directly assign the prepared materials to the selected model, which is relatively close to the practice in conventional modeling software, which is convenient for material management and setting.
The "batch modify model material color" function can modify the color of the model in batches according to the attributes of the objects, which is suitable for data with a large number of objects, but does not support setting materials with texture maps.
With the "Material Editing" function, the selected object can be isolated and observed, and its color and texture can be modified. If the object is not easy to observe in the overall scene, it can be edited through this function.
The above three methods of editing materials have their own strengths. In actual use, choose according to the characteristics of the data.
Start SuperMap iServer, enter the quick service creation page, click "Quickly publish a service or a group of services", and then select "Workspace" - "REST-Data Service".
After the publishing is successful, the page will pop up the "Quick Publishing Service-Configuration Complete" window.
Click to enter the service address in the configuration completion window, and then click to enter "data-datasource-data source name-datasets-dataset name-features". This page lists the number of elements of GEOMODEL under the current dataset. Here, there are 11 geometric objects under the demonstration dataset, so the number of elements is 11.
That is, the service address of the first geological model object under the dataset is: http://localhost:8090/iserver/services/data-WenDangBianXie-2/rest/data/datasources/data source name/datasets/data Set name/features/1.stream
The service addresses of subsequent model objects in the dataset are: http://localhost:8090/iserver/services/data-WenDangBianXie-2/rest/data/data sources/data source name /datasets/dataset name/features/2.stream
By citing the data released in the above steps, relevant real-time analysis functions can be realized according to the relevant interfaces provided.
In SuperMap iClient3D for WebGL, observe the internal structural shape of the geological body and the changes along the section plane by sectioning.
In SuperMap iClient3D for WebGL, the geological body can be clipped into any shape by clipping function.
In SuperMap iClient3D for WebGL, geological bodies can be excavated in any shape through the excavation function.
In the actual scene, there may be such a situation: in the real scale, it is not easy to find and browse those objects with great geological significance but thin thickness; some geological bodies with large thickness but narrow range are also It is not convenient for overall browsing and observation. At this time, it is convenient to observe by changing the zoom of the model in the vertical direction.
In SuperMap iClient3D for WebGL, the real-time virtual drilling function provided can simulate the effect of drilling a geological body.
Currently, there are two ways to do the geological explosion effect:
1. By way of data service
2. The method of loading local data through dynamic layer
First introduce the way of data service: the way of data service does not require further processing of the model data set, and the service obtained in step 2.2 can be used directly.
$('#explode').click(function(){ var curInstance = solidModelsProfile._s3mInstanceCollection._group[modelUrls[0] +'.stream'].instances._array[0] var enu = SuperMap3D.Transforms.eastNorthUpToFixedFrame( curInstance.position,SuperMap3D.Ellipsoid.WGS84, new SuperMap3D.Matrix4() ); var offset = new SuperMap3D.Cartesian3(0, 0, 900); var newPos = SuperMap3D.Matrix4.multiplyByPoint( enu, offset, new SuperMap3D.Cartesian3() ); curInstance.updatePosition(newPos); curInstance = solidModelsProfile._s3mInstanceCollection._group[modelUrls[1] +'.stream'].instances._array[0] enu = SuperMap3D.Transforms.eastNorthUpToFixedFrame( curInstance.position, SuperMap3D.Ellipsoid.WGS84, new SuperMap3D.Matrix4() ); offset = new SuperMap3D.Cartesian3(0, 0, 800); newPos = SuperMap3D.Matrix4.multiplyByPoint( enu, offset, new SuperMap3D.Cartesian3() ); curInstance.updatePosition(newPos);
$("#reset").click(function(){ var curInstance = solidModelsProfile._s3mInstanceCollection._group[modelUrls[0]+'.stream'].instances._array[0] var enu = SuperMap3D.Transforms.eastNorthUpToFixedFrame( curInstance.position,SuperMap3D.Ellipsoid.WGS84, new SuperMap3D.Matrix4() ); var offset = new SuperMap3D.Cartesian3(0, 0, -900); var newPos = SuperMap3D.Matrix4.multiplyByPoint( enu, offset, new SuperMap3D.Cartesian3() ); curInstance.updatePosition(newPos); curInstance = solidModelsProfile._s3mInstanceCollection._group[modelUrls[1]+'.stream'].instances._array[0] enu = SuperMap3D.Transforms.eastNorthUpToFixedFrame( curInstance.position, SuperMap3D.Ellipsoid.WGS84, new SuperMap3D.Matrix4() ); offset = new SuperMap3D.Cartesian3(0, 0, -800); newPos = SuperMap3D.Matrix4.multiplyByPoint( enu, offset, new SuperMap3D.Cartesian3() ); curInstance.updatePosition(newPos);
How to load local data through dynamic layers:
Currently, the dynamic layer only supports loading files in .s3m and .s3mb format, and does not support files in .json format, so further processing of the model dataset is required.
In SuperMap iClient3D for WebGL, the position of the geological body object is determined by setting the model insertion point, so it is necessary to fill in the position coordinates of the model insertion point on the page. If the data is in a projected coordinate system, it is necessary to convert the projected coordinate system to a geographic coordinate system
and then obtain the coordinates of the insertion point of the model.
1. Create a new dynamic layer and add geological bodies to the corresponding dynamic layer.
var cell1 = '../data/Layer1.s3m'; var cell2 = '../data /Layer2.s3m' … var layer = new SuperMap3D.DynamicLayer3D( scene._context, [cell1,cell2…] ); layer.updateInterval = 500;//Dynamic layer update time layer.enableLocalOffset = false;//Disable model local offsets scene.primitives.add(layer)
2、Write the value of the insertion point obtained in step ①
var points = [ [11x. 000,3x. 000,-46.56], … ];
3、Set the color and other information of the geological body. If you already have a color, you don’t need to set it again
var point1 = points[0]; var cellState1 = new SuperMap3D.DynamicObjectState({ id:1, longitude: point1[0], latitude: point1[1], altitude: point1[2], color:new SuperMap3D.Color(94/255, 179/255, 59/255, 1) });
4、Control the offset of each dynamic layer individually
document.getElementById("explode").onclick = function() { keymap[cell1][0].altitude =keymap[cell1][0].altitude+5000; keymap[cell1][0].lockOrientation = true; layer.updateObjectWithModel( cell1, keymap[cell1 ]) … }
The explosion effect achieved through data services, the movement of the geological model has no transition effect; the movement of the geological model has a smooth transition effect through the way of loading local data through dynamic layers.
1. When editing model materials, SuperMap iDesktop 10i (2020) version is required to have the function of the material editor.
2. The real-time analysis function of geological bodies mentioned in the document needs the SuperMap_iClient3D_10i(2020) version to support it.
3. The coordinate system of the data set must be a geographic coordinate system. If it is a projected coordinate system, it needs to be converted into a geographic coordinate system before operation.
4. iServer requires version 10.12